# Contributor: Grigory Kirillov <txgk@bk.ru>
# Maintainer: Celeste <cielesti@protonmail.com>
pkgname=unfurl
pkgver=0.4.3
pkgrel=13
pkgdesc="Pull out bits of URLs provided on stdin"
url="https://github.com/tomnomnom/unfurl"
arch="all"
license="MIT"
makedepends="go"
source="https://github.com/tomnomnom/unfurl/archive/v$pkgver/unfurl-v$pkgver.tar.gz"

export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}"
export GOTMPDIR="${GOTMPDIR:-"$srcdir"}"
export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}"

build() {
	go build
}

check() {
	go test
}

package() {
	install -Dm755 unfurl -t "$pkgdir"/usr/bin/
}

sha512sums="
172c99b2126cdadad5aa5c0a433fd9039ae7e4d0140e7b7d01e6df414104a0737caabd46a1f7294d87b7a074409a1249475c2d82771e4ceba2785d372ce0242a  unfurl-v0.4.3.tar.gz
"
